Skip to content

Java Derusting#7

Open
maple-johnson wants to merge 7 commits intogrc-cohort-21:mainfrom
maple-johnson:main
Open

Java Derusting#7
maple-johnson wants to merge 7 commits intogrc-cohort-21:mainfrom
maple-johnson:main

Conversation

@maple-johnson
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@auberonedu auberonedu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! See feedback below

Comment thread src/MapPractice.java
Comment on lines +50 to +53
for (String keys : mapPractice.keySet())
{
System.out.println(keys + " and " + mapPractice.get(keys));
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works! In the future, you could also consider entrySet

Comment thread src/StringPractice.java
Comment on lines 43 to +46
// Join all of the strings in the list together into a single string separated by commas
// Use a built-in method to achieve this instead of using a loop
String comp = listStrings.toString();
System.out.println(comp);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea here! We do technically get the strings joined by commas, but we also get extra square brackets and spaces which we may not want. Consider using the join method in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants